<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of bonus
 *
 * @author Eucassio Gonçalves - eucassiojr@gmail.com
 */
class BonusAction extends ActionDefault {

    private $bonusService;
    public static $VIEW_BONUS = "view/bonus/";

    
    function BonusAction() {

        parent::__construct();
        $this->setValueOutput("bonusMenu", "current");
        $this->bonusService = new BonusService();
    }
    
    public function getView(){
        return BonusAction::$VIEW_BONUS;
    }

    public function cadastro() {
        $this->setValueOutput("bonusSubmenu", "current");
        $this->show(BonusAction::$VIEW_BONUS . "cadastro.tpl");
    }
    
    public function salvar($bonusBean) {
        
        $this->bonusService->salvar($bonusBean);
        parent::setValueOutput("msg", new MensagemMeta(Constantes::$MSG_SUCCESS, "Operação Realizada Com Sucesso!!!"));
        parent::chain('BonusAction.listar');
    }

    public function editar($bonusID) {
        
    }

    public function listar() {
        return $this->bonusService->listar(0,"",-1);
    }   

    public function buscar() {
        
    }

    public function excluir($bonusID) {
        
    }

    public function detalhes($bonusID) {
        
    }

}

?>
